package com.ys.entity.purchase;

import java.util.Date;
import javax.persistence.Table;
import com.alibaba.fastjson.annotation.JSONField;
import com.ys.annotation.YsField;
import com.ys.entity.base.BaseEntity;
/**
*/
@Table(name="TS_Api1688ToKen", catalog="Id")
public class TsApi1688ToKen extends BaseEntity<TsApi1688ToKen> {

	@YsField(nameDataBase="Id", nameJava="id", typeDataBase="int")
	private Integer id;
	@YsField(nameDataBase="AccessToken", nameJava="accessToken", typeDataBase="varchar")
	private String accessToken;
	@YsField(nameDataBase="AliId", nameJava="aliId", typeDataBase="varchar")
	private String aliId;
	@YsField(nameDataBase="RefreshToken", nameJava="refreshToken", typeDataBase="varchar")
	private String refreshToken;
	@YsField(nameDataBase="ResourceOwner", nameJava="resourceOwner", typeDataBase="varchar")
	private String resourceOwner;
	@YsField(nameDataBase="ExpiresIn", nameJava="expiresIn", typeDataBase="varchar")
	private String expiresIn;
	@YsField(nameDataBase="RefreshTokenTimeout", nameJava="refreshTokenTimeout", typeDataBase="varchar")
	private String refreshTokenTimeout;
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@YsField(nameDataBase="RefreshTokenDate", nameJava="refreshTokenDate", typeDataBase="datetime")
	private Date refreshTokenDate;
	@YsField(nameDataBase="MemberId", nameJava="memberId", typeDataBase="varchar")
	private String memberId;
	@YsField(nameDataBase="Status", nameJava="status", typeDataBase="tinyint")
	private Integer status;
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@YsField(nameDataBase="CreateTime", nameJava="createTime", typeDataBase="datetime")
	private Date createTime;
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@YsField(nameDataBase="UpdateTime", nameJava="updateTime", typeDataBase="datetime")
	private Date updateTime;

	public Integer getId() {
		return id;
	}
	public TsApi1688ToKen setId(Integer id) {
		this.id = id;
		return this;
	}
	public String getAccessToken() {
		return accessToken;
	}
	public TsApi1688ToKen setAccessToken(String accessToken) {
		this.accessToken = accessToken;
		return this;
	}
	public String getAliId() {
		return aliId;
	}
	public TsApi1688ToKen setAliId(String aliId) {
		this.aliId = aliId;
		return this;
	}
	public String getRefreshToken() {
		return refreshToken;
	}
	public TsApi1688ToKen setRefreshToken(String refreshToken) {
		this.refreshToken = refreshToken;
		return this;
	}
	public String getResourceOwner() {
		return resourceOwner;
	}
	public TsApi1688ToKen setResourceOwner(String resourceOwner) {
		this.resourceOwner = resourceOwner;
		return this;
	}
	public String getExpiresIn() {
		return expiresIn;
	}
	public TsApi1688ToKen setExpiresIn(String expiresIn) {
		this.expiresIn = expiresIn;
		return this;
	}
	public String getRefreshTokenTimeout() {
		return refreshTokenTimeout;
	}
	public TsApi1688ToKen setRefreshTokenTimeout(String refreshTokenTimeout) {
		this.refreshTokenTimeout = refreshTokenTimeout;
		return this;
	}
	public Date getRefreshTokenDate() {
		return refreshTokenDate;
	}
	public TsApi1688ToKen setRefreshTokenDate(Date refreshTokenDate) {
		this.refreshTokenDate = refreshTokenDate;
		return this;
	}
	public String getMemberId() {
		return memberId;
	}
	public TsApi1688ToKen setMemberId(String memberId) {
		this.memberId = memberId;
		return this;
	}
	public Integer getStatus() {
		return status;
	}
	public TsApi1688ToKen setStatus(Integer status) {
		this.status = status;
		return this;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public TsApi1688ToKen setCreateTime(Date createTime) {
		this.createTime = createTime;
		return this;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public TsApi1688ToKen setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
		return this;
	}

	public static TsApi1688ToKen tsApi1688ToKen(
		String accessToken,
		String aliId,
		String refreshToken,
		String resourceOwner,
		String expiresIn,
		String refreshTokenTimeout,
		Date refreshTokenDate,
		String memberId,
		Integer status
			) {
		TsApi1688ToKen entity = new TsApi1688ToKen();
		entity.setAccessToken(accessToken);
		entity.setAliId(aliId);
		entity.setRefreshToken(refreshToken);
		entity.setResourceOwner(resourceOwner);
		entity.setExpiresIn(expiresIn);
		entity.setRefreshTokenTimeout(refreshTokenTimeout);
		entity.setRefreshTokenDate(refreshTokenDate);
		entity.setMemberId(memberId);
		entity.setStatus(status);
		return entity;
	}
}